package com.dht.xiao.jianye.dayin;

import android.app.Application;

public class MyApplication extends Application {
	private static PrinterManager printerManager = null;
	private static MyApplication application;


    public static  MyApplication getInstance(){
        if(application == null){
            application = new MyApplication();
        }
        return application;
    }

	/**
     * 获取PrinterManager对象
     *
     * @return
     */
    public PrinterManager getPrinterManager() {
        if(printerManager == null){
            printerManager = PrinterManager.getInstance();// 获取管理对象
            return printerManager;
        }else{
            return printerManager;
        }
    }
	
	@Override
	public void onCreate() {
		super.onCreate();
        application = this;
		System.out.println("---------application start");
	}
}
